import request from '@/utils/request'

// 查询基础数据配置信息列表
export function listDispose(query) {
  return request({
    url: '/reportworld/dispose/list',
    method: 'get',
    params: query
  })
}

// 查询基础数据配置信息详细
export function getDispose(data) {
  return request({
    url: '/reportworld/dispose/getDispose',
    method: 'post',
    data: data
  })
}

// 新增基础数据配置信息
export function addDispose(data) {
  return request({
    url: '/reportworld/dispose',
    method: 'post',
    data: data
  })
}

// 修改基础数据配置信息
export function updateDispose(data) {
  return request({
    url: '/reportworld/dispose',
    method: 'put',
    data: data
  })
}

// 删除基础数据配置信息
export function delDispose(idList, hisVersion) {
  const data = {
    idList,
    hisVersion
  };
  return request({
    url: '/reportworld/dispose/remove',
    method: 'post',
    data: data
  })
}

// 初始话一个表配置信息
export function initDispose(tableName, hisVersion) {
  const data = {
    tableName,
    hisVersion
  };
  return request({
    url: '/reportworld/dispose/initDispose/',
    method: 'post',
    data: data
  })
}

/**
 * 保存顺序
 * @param data
 */
export function handleUpdateOrderNum(data) {
  return request({
    url: '/reportworld/dispose/handleUpdateOrderNum',
    method: 'post',
    data: data
  })
}
